<?php
//use think\Route;  // 加了反而错了。。
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

Route::get('think', function () {
    return 'hello,ThinkPHP5!';
});

// http://localhost/tp-demo/index.php/index/index/hello
// 到index.php里的Index类的hello方法
//Route::get('hello/:name', 'index/hello');

// http://localhost/tp-demo/index.php/index/hello
//Route::get(':c/:a', 'index/:c/:a');

// 匿名函数就相当于lambda表达式（最前面的/可要可不要）
Route::get('/test', function() {
    $func = function($a) {
        return $a."方式";
    };
    return '费时间考虑'.$func('方式');
});

return [

];
